//PACKAGE COM.WQL.HTML2PIC;
//
//IMPORT GUI.AVA.HTML.IMAGE.GENERATOR.HTMLIMAGEGENERATOR;
//
//IMPORT JAVA.AWT.AWTEXCEPTION;
//IMPORT JAVA.AWT.DESKTOP;
//IMPORT JAVA.AWT.DIMENSION;
//IMPORT JAVA.AWT.GRAPHICS;
//IMPORT JAVA.AWT.IMAGE;
//IMPORT JAVA.AWT.RECTANGLE;
//IMPORT JAVA.AWT.ROBOT;
//IMPORT JAVA.AWT.TOOLKIT;
//IMPORT JAVA.AWT.EVENT.KEYEVENT;
//IMPORT JAVA.AWT.IMAGE.BUFFEREDIMAGE;
//IMPORT JAVA.IO.FILE;
//IMPORT JAVA.IO.IOEXCEPTION;
//IMPORT JAVA.NET.MALFORMEDURLEXCEPTION;
//IMPORT JAVA.NET.URISYNTAXEXCEPTION;
//IMPORT JAVA.NET.URL;
//
//IMPORT JAVAX.IMAGEIO.IMAGEIO;
//
//PUBLIC CLASS TEST {
//
//	PUBLIC STATIC VOID MAIN(STRING[] ARGS) THROWS MALFORMEDURLEXCEPTION, IOEXCEPTION, URISYNTAXEXCEPTION, AWTEXCEPTION {
//		// TEST1();
//		TEST2();
//	}
//
//	PUBLIC STATIC VOID TEST2() THROWS MALFORMEDURLEXCEPTION, IOEXCEPTION, URISYNTAXEXCEPTION, AWTEXCEPTION {
//		// 此方法仅适用于JDK1.6及以上版本
//		DESKTOP.GETDESKTOP().BROWSE(NEW URL("HTTP://WWW.BAIDU.COM/").TOURI());
//		ROBOT ROBOT = NEW ROBOT();
//		ROBOT.DELAY(10000);
//		DIMENSION D = NEW DIMENSION(TOOLKIT.GETDEFAULTTOOLKIT().GETSCREENSIZE());
//		INT WIDTH = (INT) D.GETWIDTH();
//		INT HEIGHT = (INT) D.GETHEIGHT();
//		// 最大化浏览器
//		ROBOT.KEYRELEASE(KEYEVENT.VK_F11);
//		ROBOT.DELAY(2000);
//		IMAGE IMAGE = ROBOT.CREATESCREENCAPTURE(NEW RECTANGLE(0, 0, WIDTH, HEIGHT));
//		BUFFEREDIMAGE BI = NEW BUFFEREDIMAGE(WIDTH, HEIGHT, BUFFEREDIMAGE.TYPE_INT_RGB);
//		GRAPHICS G = BI.CREATEGRAPHICS();
//		G.DRAWIMAGE(IMAGE, 0, 0, WIDTH, HEIGHT, NULL);
//		// 保存图片
//		IMAGEIO.WRITE(BI, "JPG", NEW FILE("F:/BAIDU.JPG"));
//	}
//
//	PRIVATE STATIC VOID TEST1() {
//		HTMLIMAGEGENERATOR H = NEW HTMLIMAGEGENERATOR();
//		H.LOADURL("HTTP://MY.OSCHINA.NET/LONGNIAO/BLOG/84236");
//		H.SAVEASIMAGE(NEW FILE("F:/OSCHINA.PNG"));
//		H.SAVEASHTMLWITHMAP("F:/OSCHINA.HTML", "F:/OSCHINA.PNG");
//	}
//
//}
